<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
</head>

<body>
		<?php
			//set where you want to store files
			//in this example we keep file in folder upload
			//$_FILES['ufile']['name']; = upload file name
			//for example upload file name cartoon.gif . $path will be upload/cartoon.gif
			$path1= "upload/".$_FILES['ufile']['name'][0];
			$path2= "upload/".$_FILES['ufile']['name'][1];
			$path3= "upload/".$_FILES['ufile']['name'][2];
			
			//copy file to where you want to store file
			//echo "nnn".$HTTP_POST_FILES['ufile']['tmp_name'][0] ;
			copy($_FILES['ufile']['tmp_name'][0], $path1);
			copy($_FILES['ufile']['tmp_name'][1], $path2);
			copy($_FILES['ufile']['tmp_name'][2], $path3);
			
			//$_FILES['ufile']['name'] = file name
			//$_FILES['ufile']['size'] = file size
			//$_FILES['ufile']['type'] = type of file
			echo "File Name :".$_FILES['ufile']['name'][0]."<BR/>"; 
			$tenfile = $path1;
  			echo "<a href='".$tenfile."' >kkkk<br/></a>";
			echo "File Size :".$_FILES['ufile']['size'][0]."<BR/>";
			echo "File Type :".$_FILES['ufile']['type'][0]."<BR/>";
			echo "<img src=\"$path1\" width=\"150\" height=\"150\">";
			echo "<P>";
			
			echo "File Name :".$_FILES['ufile']['name'][1]."<BR/>";
			echo "File Size :".$_FILES['ufile']['size'][1]."<BR/>";
			echo "File Type :".$_FILES['ufile']['type'][1]."<BR/>";
			echo "<img src=\"$path2\" width=\"150\" height=\"150\">";
			echo "<P>";
			
			echo "File Name :".$_FILES['ufile']['name'][2]."<BR/>";
			echo "File Size :".$_FILES['ufile']['size'][2]."<BR/>";
			echo "File Type :".$_FILES['ufile']['type'][2]."<BR/>";
			echo "<img src=\"$path3\" width=\"150\" height=\"150\">";
			
			///////////////////////////////////////////////////////
			
			// Use this code to display the error or success.
			
			$filesize1=$_FILES['ufile']['size'][0];
			$filesize2=$_FILES['ufile']['size'][1];
			$filesize3=$_FILES['ufile']['size'][2];
			
			if($filesize1 && $filesize2 && $filesize3 != 0){
				echo "We have recieved your files";
			}
			
			else {
				echo "ERROR.....";
			}
			
			//////////////////////////////////////////////
			
			// What files that have a problem? (if found)
			
			if($filesize1==0) {
				echo "There're something error in your first file";
				echo "<BR />";
			}
			
			if($filesize2==0) {
				echo "There're something error in your second file";
				echo "<BR />";
			}
			
			if($filesize3==0) {
				echo "There're something error in your third file";
				echo "<BR />";
			}
		
		?>
</body>
</html>
